.farris-image-cropper-frame {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    text-align: center;

    .farris-image-cropper {
        width: 100%;
        position: relative;

        .farris-source-image {
            max-width: 100%;
            max-height: 100%;
            transform-origin: center;
        }
    }

    .farris-image-overlay {
        position: absolute;
        pointer-events: none;
        touch-action: none;
        outline: white solid 100vw;
        top: 0;
        left: 0;
    }

    .farris-image-cropper-wrapper {
        position: absolute;
        display: flex;
        color: #53535C;
        background: transparent;
        outline: rgba(0, 0, 0, 0.3) solid 100vw;
        outline: var(--cropper-outline-color, rgba(0, 0, 0, 0.3)) solid 100vw;
        touch-action: none;

        @media (orientation: portrait) {
            outline-width: 100vh;
        }

        &:after {
            position: absolute;
            content: '';
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            pointer-events: none;
            border: dashed 1px;
            opacity: .75;
            color: inherit;
            z-index: 1;
        }

        .farris-image-cropper-move {
            width: 100%;
            cursor: move;
            border-radius: 100%;
            border: 1px solid #388fff;
        }

        &:focus {
            .farris-image-cropper-move {
                border-color: dodgerblue;
                border-width: 2px;
            }
        }

        .farris-image-cropper-resize {
            position: absolute;
            display: inline-block;
            line-height: 6px;
            padding: 8px;
            opacity: .85;
            z-index: 1;

            .farris-image-cropper-square {
                display: inline-block;
                background: #388fff;
                width: 6px;
                height: 6px;
                border: 1px solid #59a1ff;
                box-sizing: content-box;
            }

            &.topleft {
                top: -12px;
                left: -12px;
                cursor: nwse-resize;
            }

            &.top {
                top: -12px;
                left: calc(50% - 12px);
                cursor: ns-resize;
            }

            &.topright {
                top: -12px;
                right: -12px;
                cursor: nesw-resize;
            }

            &.right {
                top: calc(50% - 12px);
                right: -12px;
                cursor: ew-resize;
            }

            &.bottomright {
                bottom: -12px;
                right: -12px;
                cursor: nwse-resize;
            }

            &.bottom {
                bottom: -12px;
                left: calc(50% - 12px);
                cursor: ns-resize;
            }

            &.bottomleft {
                bottom: -12px;
                left: -12px;
                cursor: nesw-resize;
            }

            &.left {
                top: calc(50% - 12px);
                left: -12px;
                cursor: ew-resize;
            }

        }

        .farris-image-cropper-resize-bar {
            position: absolute;
            z-index: 1;

            &.top {
                top: -11px;
                left: 11px;
                width: calc(100% - 22px);
                height: 22px;
                cursor: ns-resize;
            }

            &.right {
                top: 11px;
                right: -11px;
                height: calc(100% - 22px);
                width: 22px;
                cursor: ew-resize;
            }

            &.bottom {
                bottom: -11px;
                left: 11px;
                width: calc(100% - 22px);
                height: 22px;
                cursor: ns-resize;
            }

            &.left {
                top: 11px;
                left: -11px;
                height: calc(100% - 22px);
                width: 22px;
                cursor: ew-resize;
            }
        }

        &.farris-image-cropper-rounded {
            outline-color: transparent;
            width: 161px;
            height: 161px;

            &:after {
                border-radius: 100%;
                box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.3);
                box-shadow: 0 0 0 100vw (var(--cropper-outline-color, rgba(0, 0, 0, 0.3)));

                @media (orientation: portrait) {
                    box-shadow: 0 0 0 100vh rgba(0, 0, 0, 0.3);
                    box-shadow: 0 0 0 100vh (var(--cropper-outline-color, rgba(0, 0, 0, 0.3)));
                }
            }

            .farris-image-cropper-move {
                border-radius: 100%;
            }
        }
    }

    &.farris-image-cropper-disabled {
        .farris-image-cropper-wrapper {

            .farris-image-cropper-resize,
            .farris-image-cropper-resize-bar,
            .farris-image-cropper-move {
                display: none;
            }
        }
    }

    .farris-image-cropper-error {
        width: 100%;
        text-align: center;
        font-size: 14px;

    }

    .farris-image-cropper-loading {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

        .farris-image-cropper-loading-spinner {
            width: 31px;
            height: 31px;
            margin: 0 auto;
            border: 2px solid #388fff;
            border-radius: 50%;
            border-left-color: transparent;
            border-right-color: transparent;
            -webkit-animation: cssload-spin 425ms infinite linear;
            position: absolute;
            top: calc(50% - 15px);
            left: calc(50% - 15px);
            animation: cssload-spin 425ms infinite linear;
        }
    }
}

@-webkit-keyframes cssload-spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
    }
}

@keyframes cssload-spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg)
    }
}


.dialog-user-avatar {
    padding: 24px 32px 0 24px;
    display: flex;
    flex-direction: row;
}

.dialog-user-avatar-change {
    padding-right: 36px;
    border-right: 1px solid #EFEFEF;

    .avatar-cropper {
        width: 290px;
        height: 290px;

        .avatar-cropper-wrapper {
            display: flex;
            align-items: center;
            width: 100%;
            height: 100%;
        }
    }
}

.avatar-cropper-btns {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 10px;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.75);

    .avatar-cropper-btns-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        position: relative;
        padding: 0 14px;
        cursor: pointer;

        &::after {
            position: absolute;
            right: 0;
            top: 50%;
            margin-top: -8px;
            width: 1px;
            height: 16px;
            background: rgba(0, 0, 0, 0.10);
            content: '';
        }

        &:last-child::after {
            display: none;
        }

        .f-icon {
            color: rgba(0, 0, 0, 0.25);

        }

        .avatar-cropper-btns-item-scale {
            padding: 0 10px;
        }

        .avatar-cropper-scale {
            display: block;
            width: 20px;
            height: 20px;
            text-align: center;
            line-height: 20px;
        }
    }

}

.dialog-user-avatar-tips {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 24px 24px;
    margin-top: 10px;

    .dialog-user-avatar-upload {
        margin-right: 14px;
    }

    .dialog-user-avatar-tip-content {
        font-size: 12px;
        color: rgba(0, 0, 0, 0.45);
    }
}

.dialog-user-avatar-view {
    padding-left: 36px;
}

.dialog-user-avatar-view .avatar-view-title {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.75);
    text-align: center;
    margin-bottom: 15px;
}

.dialog-user-avatar-view .avatar-view-size {
    margin-bottom: 32px;
}

.dialog-user-avatar-view .avatar-view-size:last-child {
    margin-bottom: 0;
}

.dialog-user-avatar-view .avatar-view-size .img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #EFEFEF;
}

.dialog-user-avatar-view .avatar-view-size .avatar-view-size-text {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    display: block;
    text-align: center;
    margin-top: 10px;
}

.dialog-user-avatar-view .avatar-view-size.avatar-view-size-small .img {
    width: 50px;
    height: 50px;
}